import { useLocation } from 'react-router-dom';

const usePathName = () => {
    const location = useLocation();
    const pathNames = {
        '/fan/login': '登录',
        '/fan/face': '人脸识别',
        '/fan/phone':'手机号登录',
        '/fan/register':'注册',

        // 其他路由的 pathName
    };

    return pathNames[location.pathname] || '未知路径';
};

export default usePathName;